home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 64 72 | 75 69 64 2e 62 6f 72 6c |Path: dr|uid.borl|
|00000010| 61 6e 64 2e 63 6f 6d 21 | 75 73 65 6e 65 74 0a 46 |and.com!|usenet.F|
|00000020| 72 6f 6d 3a 20 4a 65 66 | 66 20 4a 65 6e 6b 69 6e |rom: Jef|f Jenkin|
|00000030| 73 20 3c 6a 6a 65 6e 6b | 69 6e 73 40 77 70 6f 2e |s <jjenk|ins@wpo.|
|00000040| 62 6f 72 6c 61 6e 64 2e | 63 6f 6d 3e 0a 4e 65 77 |borland.|com>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 2b 2b 0a 53 | 75 62 6a 65 63 74 3a 20 |ng.c++.S|ubject: |
|00000070| 52 65 3a 20 4d 65 6d 6f | 72 79 20 6c 65 61 6b 20 |Re: Memo|ry leak |
|00000080| 69 6e 20 42 6f 72 6c 61 | 6e 64 20 43 2b 2b 20 54 |in Borla|nd C++ T|
|00000090| 75 74 6f 72 69 61 6c 3f | 0a 44 61 74 65 3a 20 4d |utorial?|.Date: M|
|000000a0| 6f 6e 2c 20 31 31 20 4d | 61 72 20 31 39 39 36 20 |on, 11 M|ar 1996 |
|000000b0| 30 37 3a 31 38 3a 31 36 | 20 2d 30 38 30 30 0a 4f |07:18:16| -0800.O|
|000000c0| 72 67 61 6e 69 7a 61 74 | 69 6f 6e 3a 20 42 6f 72 |rganizat|ion: Bor|
|000000d0| 6c 61 6e 64 20 49 6e 74 | 65 72 6e 61 74 69 6f 6e |land Int|ernation|
|000000e0| 61 6c 0a 4d 65 73 73 61 | 67 65 2d 49 44 3a 20 3c |al.Messa|ge-ID: <|
|000000f0| 33 31 34 34 34 34 33 38 | 2e 35 34 31 43 40 77 70 |31444438|.541C@wp|
|00000100| 6f 2e 62 6f 72 6c 61 6e | 64 2e 63 6f 6d 3e 0a 52 |o.borlan|d.com>.R|
|00000110| 65 66 65 72 65 6e 63 65 | 73 3a 20 3c 34 68 74 71 |eference|s: <4htq|
|00000120| 33 61 24 6c 6f 6e 40 73 | 74 61 74 75 73 2e 67 65 |3a$lon@s|tatus.ge|
|00000130| 6e 2e 6e 7a 3e 0a 4e 4e | 54 50 2d 50 6f 73 74 69 |n.nz>.NN|TP-Posti|
|00000140| 6e 67 2d 48 6f 73 74 3a | 20 62 65 61 73 74 6c 79 |ng-Host:| beastly|
|00000150| 2e 62 6f 72 6c 61 6e 64 | 2e 63 6f 6d 0a 4d 69 6d |.borland|.com.Mim|
|00000160| 65 2d 56 65 72 73 69 6f | 6e 3a 20 31 2e 30 0a 43 |e-Versio|n: 1.0.C|
|00000170| 6f 6e 74 65 6e 74 2d 54 | 79 70 65 3a 20 74 65 78 |ontent-T|ype: tex|
|00000180| 74 2f 70 6c 61 69 6e 3b | 20 63 68 61 72 73 65 74 |t/plain;| charset|
|00000190| 3d 75 73 2d 61 73 63 69 | 69 0a 43 6f 6e 74 65 6e |=us-asci|i.Conten|
|000001a0| 74 2d 54 72 61 6e 73 66 | 65 72 2d 45 6e 63 6f 64 |t-Transf|er-Encod|
|000001b0| 69 6e 67 3a 20 37 62 69 | 74 0a 58 2d 4d 61 69 6c |ing: 7bi|t.X-Mail|
|000001c0| 65 72 3a 20 4d 6f 7a 69 | 6c 6c 61 20 32 2e 30 20 |er: Mozi|lla 2.0 |
|000001d0| 28 57 69 6e 39 35 3b 20 | 49 29 0a 54 6f 3a 20 44 |(Win95; |I).To: D|
|000001e0| 61 76 69 64 20 54 65 76 | 69 6f 74 64 61 6c 65 20 |avid Tev|iotdale |
|000001f0| 3c 64 74 65 76 69 6f 74 | 40 69 63 6f 6e 7a 2e 63 |<dteviot|@iconz.c|
|00000200| 6f 2e 6e 7a 3e 0a 0a 44 | 61 76 69 64 20 54 65 76 |o.nz>..D|avid Tev|
|00000210| 69 6f 74 64 61 6c 65 20 | 77 72 6f 74 65 3a 0a 3e |iotdale |wrote:.>|
|00000220| 20 0a 3e 20 49 20 68 61 | 76 65 20 72 65 63 65 6e | .> I ha|ve recen|
|00000230| 74 6c 79 20 70 75 72 63 | 68 61 73 65 64 20 42 6f |tly purc|hased Bo|
|00000240| 72 6c 61 6e 64 20 43 2b | 2b 20 34 2e 35 31 2c 20 |rland C+|+ 4.51, |
|00000250| 61 6e 64 20 61 6d 20 77 | 6f 72 6b 69 6e 67 20 6d |and am w|orking m|
|00000260| 79 0a 3e 20 77 61 79 20 | 74 68 72 6f 75 67 68 20 |y.> way |through |
|00000270| 74 68 65 20 4f 62 6a 65 | 63 74 57 69 6e 64 6f 77 |the Obje|ctWindow|
|00000280| 73 20 54 75 74 6f 72 69 | 61 6c 20 62 6f 6f 6b 2e |s Tutori|al book.|
|00000290| 20 20 48 6f 77 65 76 65 | 72 2c 20 49 20 61 6d 0a | Howeve|r, I am.|
|000002a0| 3e 20 76 65 72 79 20 70 | 75 7a 7a 6c 65 64 2c 20 |> very p|uzzled, |
|000002b0| 61 73 20 69 6e 20 6d 61 | 6e 79 20 70 6c 61 63 65 |as in ma|ny place|
|000002c0| 73 2c 20 74 68 65 20 63 | 6f 64 65 20 73 68 6f 77 |s, the c|ode show|
|000002d0| 6e 20 6c 6f 6f 6b 73 20 | 6c 69 6b 65 0a 3e 20 69 |n looks |like.> i|
|000002e0| 74 20 77 69 6c 6c 20 63 | 61 75 73 65 20 6d 65 6d |t will c|ause mem|
|000002f0| 6f 72 79 20 6c 65 61 6b | 73 2e 20 46 6f 72 20 65 |ory leak|s. For e|
|00000300| 78 61 6d 70 6c 65 3a 0a | 3e 20 0a 3e 20 6f 6e 20 |xample:.|> .> on |
|00000310| 70 61 67 65 20 35 20 69 | 73 20 74 68 65 20 6c 69 |page 5 i|s the li|
|00000320| 6e 65 3a 0a 3e 20 53 65 | 74 4d 61 69 6e 57 69 6e |ne:.> Se|tMainWin|
|00000330| 64 6f 77 28 20 6e 65 77 | 20 54 46 72 61 6d 65 57 |dow( new| TFrameW|
|00000340| 69 6e 64 6f 77 28 20 30 | 2c 20 22 53 61 6d 70 6c |indow( 0|, "Sampl|
|00000350| 65 20 4f 62 6a 65 63 74 | 57 69 6e 64 6f 77 73 20 |e Object|Windows |
|00000360| 50 72 6f 67 72 61 6d 22 | 20 29 20 29 0a 3e 20 0a |Program"| ) ).> .|
|00000370| 3e 20 6f 6e 20 70 61 67 | 65 20 34 31 20 74 68 65 |> on pag|e 41 the|
|00000380| 20 63 6f 64 65 3a 0a 3e | 20 69 66 20 28 20 6e 65 | code:.>| if ( ne|
|00000390| 77 20 54 46 69 6c 65 53 | 61 76 65 44 69 61 6c 6f |w TFileS|aveDialo|
|000003a0| 67 28 20 74 68 69 73 2c | 20 22 46 69 6c 65 44 61 |g( this,| "FileDa|
|000003b0| 74 61 28 29 2d 3e 45 78 | 65 63 75 74 65 28 29 20 |ta()->Ex|ecute() |
|000003c0| 3d 3d 20 49 44 4f 4b 20 | 29 20 29 0a 3e 20 20 20 |== IDOK |) ).> |
|000003d0| 20 53 61 76 65 46 69 6c | 65 28 29 3b 0a 3e 20 0a | SaveFil|e();.> .|
|000003e0| 3e 20 41 6e 64 20 74 68 | 65 72 65 27 73 20 65 76 |> And th|ere's ev|
|000003f0| 65 6e 20 77 6f 72 73 65 | 20 73 74 75 66 66 20 65 |en worse| stuff e|
|00000400| 6c 73 65 77 68 65 72 65 | 2e 0a 3e 20 0a 3e 20 57 |lsewhere|..> .> W|
|00000410| 68 61 74 20 69 73 20 67 | 6f 69 6e 67 20 6f 6e 3f |hat is g|oing on?|
|00000420| 20 20 43 75 72 72 65 6e | 74 6c 79 20 6d 79 20 74 | Curren|tly my t|
|00000430| 68 65 6f 72 69 65 73 20 | 61 72 65 3a 0a 3e 20 31 |heories |are:.> 1|
|00000440| 29 20 54 68 65 20 63 6f | 64 65 20 69 73 20 63 6f |) The co|de is co|
|00000450| 72 72 65 63 74 2c 20 74 | 68 65 20 6d 65 6d 6f 72 |rrect, t|he memor|
|00000460| 79 20 69 73 20 6f 6e 6c | 79 20 61 6c 6c 6f 63 61 |y is onl|y alloca|
|00000470| 74 65 64 20 6f 6e 63 65 | 2c 20 61 6e 64 20 77 65 |ted once|, and we|
|00000480| 0a 3e 20 20 20 20 72 65 | 6c 79 20 6f 6e 20 57 69 |.> re|ly on Wi|
|00000490| 6e 64 6f 77 73 20 74 6f | 20 63 6c 65 61 6e 75 70 |ndows to| cleanup|
|000004a0| 20 74 68 65 20 61 6c 6c | 6f 63 61 74 65 64 20 6d | the all|ocated m|
|000004b0| 65 6d 6f 72 79 20 77 68 | 65 6e 20 74 68 65 20 70 |emory wh|en the p|
|000004c0| 72 6f 67 72 61 6d 0a 3e | 20 20 20 20 65 6e 64 73 |rogram.>| ends|
|000004d0| 2e 20 20 28 20 54 68 69 | 73 20 6d 69 67 68 74 20 |. ( Thi|s might |
|000004e0| 61 70 70 6c 79 20 74 6f | 20 74 68 65 20 63 6f 64 |apply to| the cod|
|000004f0| 65 20 6f 6e 20 70 61 67 | 65 20 35 2c 20 62 75 74 |e on pag|e 5, but|
|00000500| 20 49 20 63 61 6e 27 74 | 20 73 65 65 0a 3e 20 20 | I can't| see.> |
|00000510| 20 20 68 6f 77 20 69 74 | 20 61 70 70 6c 69 65 73 | how it| applies|
|00000520| 20 74 6f 20 74 68 65 20 | 63 6f 64 65 20 6f 6e 20 | to the |code on |
|00000530| 70 61 67 65 20 34 31 2e | 20 29 0a 3e 20 32 29 20 |page 41.| ).> 2) |
|00000540| 54 68 65 20 63 6f 6d 70 | 69 6c 65 72 20 28 20 6f |The comp|iler ( o|
|00000550| 72 20 72 75 6e 20 74 69 | 6d 65 20 6d 65 6d 6f 72 |r run ti|me memor|
|00000560| 79 20 6d 61 6e 61 67 65 | 72 20 29 20 69 73 20 56 |y manage|r ) is V|
|00000570| 45 52 59 20 73 6f 70 68 | 69 73 74 69 63 61 74 65 |ERY soph|isticate|
|00000580| 64 2c 0a 3e 20 20 20 20 | 61 6e 64 20 63 61 6e 20 |d,.> |and can |
|00000590| 64 65 74 65 63 74 20 74 | 68 61 74 20 69 6e 20 63 |detect t|hat in c|
|000005a0| 61 73 65 73 20 6c 69 6b | 65 20 61 62 6f 76 65 20 |ases lik|e above |
|000005b0| 77 65 20 6f 6e 6c 79 20 | 77 61 6e 74 20 74 68 65 |we only |want the|
|000005c0| 20 6d 65 6d 6f 72 79 0a | 3e 20 20 20 20 74 65 6d | memory.|> tem|
|000005d0| 70 6f 72 61 72 69 6c 79 | 2c 20 61 6e 64 20 77 69 |porarily|, and wi|
|000005e0| 6c 6c 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |ll autom|atically|
|000005f0| 20 66 72 65 65 20 69 74 | 20 77 68 65 6e 20 77 65 | free it| when we|
|00000600| 20 61 72 65 20 64 6f 6e | 65 2e 0a 3e 20 33 29 20 | are don|e..> 3) |
|00000610| 54 68 65 20 63 6f 64 65 | 20 73 68 6f 77 6e 20 68 |The code| shown h|
|00000620| 61 73 20 62 65 65 6e 20 | 64 65 6c 69 62 65 72 74 |as been |delibert|
|00000630| 65 6c 79 20 73 69 6d 70 | 6c 69 66 69 65 64 20 74 |ely simp|lified t|
|00000640| 6f 20 65 6d 70 68 61 73 | 69 73 65 20 74 68 65 0a |o emphas|ise the.|
|00000650| 3e 20 20 20 20 62 61 73 | 69 63 20 70 72 69 6e 63 |> bas|ic princ|
|00000660| 69 70 6c 65 73 20 6f 66 | 20 4f 62 6a 65 63 74 57 |iples of| ObjectW|
|00000670| 69 6e 64 6f 77 73 2c 20 | 77 69 74 68 20 74 68 65 |indows, |with the|
|00000680| 20 66 69 6e 65 20 64 65 | 74 61 69 6c 73 20 66 6f | fine de|tails fo|
|00000690| 72 0a 3e 20 20 20 20 67 | 65 74 74 69 6e 67 20 69 |r.> g|etting i|
|000006a0| 74 20 74 6f 20 77 6f 72 | 6b 20 69 6e 20 6e 6f 6e |t to wor|k in non|
|000006b0| 2d 74 6f 79 20 70 72 6f | 67 72 61 6d 73 20 72 65 |-toy pro|grams re|
|000006c0| 6d 6f 76 65 64 2e 0a 0a | 54 68 65 20 4f 57 4c 20 |moved...|The OWL |
|000006d0| 66 72 61 6d 65 77 6f 72 | 6b 20 69 6d 70 6c 65 6d |framewor|k implem|
|000006e0| 65 6e 74 73 20 61 20 74 | 79 70 65 20 6f 66 20 22 |ents a t|ype of "|
|000006f0| 67 61 72 62 61 67 65 2d | 63 6f 6c 6c 65 63 74 69 |garbage-|collecti|
|00000700| 6f 6e 22 2e 20 20 53 6f | 2c 20 74 68 65 20 0a 22 |on". So|, the ."|
|00000710| 73 74 75 66 66 22 20 79 | 6f 75 20 6d 65 6e 74 69 |stuff" y|ou menti|
|00000720| 6f 6e 65 64 20 69 73 20 | 74 61 6b 65 6e 20 63 61 |oned is |taken ca|
|00000730| 72 65 20 6f 66 2e 20 0a | 0a 2d 2d 20 6a 72 6a 0a |re of. .|.-- jrj.|
+--------+-------------------------+-------------------------+--------+--------+